package org.september.pisces.menuframe.vo;

import java.util.ArrayList;
import java.util.List;

public class SimpleMenu {

	private String text="";

	private String url="";
	
	private int autoOpen;
	
	private List<SimpleMenu> children = new ArrayList<>();
	
	private SimpleMenu parent;
	
	private String iconClass="";
	
	public SimpleMenu simpleClone() {
		SimpleMenu sm = new SimpleMenu();
		sm.text = this.text;
		sm.url = this.url;
		sm.autoOpen = this.autoOpen;
		sm.iconClass = this.iconClass;
		for(SimpleMenu child : this.children) {
			SimpleMenu cloneChild = child.simpleClone();
			cloneChild.setParent(sm);
			sm.children.add(cloneChild);
		}
		return sm;
	}

	public String getIconClass() {
		return iconClass;
	}

	public void setIconClass(String iconClass) {
		this.iconClass = iconClass;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public int getAutoOpen() {
		return autoOpen;
	}

	public void setAutoOpen(int autoOpen) {
		this.autoOpen = autoOpen;
	}

	public List<SimpleMenu> getChildren() {
		return children;
	}

	public void setChildren(List<SimpleMenu> children) {
		this.children = children;
	}

	public SimpleMenu getParent() {
		return parent;
	}

	public void setParent(SimpleMenu parent) {
		this.parent = parent;
	}
	
}
